//
//  ZTimeOutOrderDetailPersonCell.m
//  DistributorAB
//
//  Created by LZY on 2019/10/16.
//  Copyright © 2019 主事丫环. All rights reserved.
//

#import "ZTimeOutOrderDetailPersonCell.h"

@interface ZTimeOutOrderDetailPersonCell ()
@property (nonatomic, strong) UILabel *lblServe;//服务类型
@property (nonatomic, strong) UILabel *lblType;//电器品类
@property (nonatomic, strong) UILabel *lblReason;//故障原因
@property (nonatomic, strong) UILabel *lblNumber;//数量
@property (nonatomic, strong) UILabel *lblContent;//备注信息
@property (nonatomic, strong) UILabel *lblDate;//预约日期
@property (nonatomic, strong) UILabel *lblTime;//预约时间
@property (nonatomic, strong) UILabel *lblAddress;//地址
@property (nonatomic, strong) UILabel *lblLift;//电梯
@property (nonatomic, strong) UILabel *lblFloor;//楼层
@property (nonatomic, strong) UILabel *lblOrderDate;//下单时间

//省级查看 未处理 处理中 已处理 三种状态布局

@end

@implementation ZTimeOutOrderDetailPersonCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.contentView.backgroundColor = kColorWithHex(0xf2f2f2);
    }
    return self;
}
#pragma mark - 省级经销商界面
- (void)setupAViewAction{
    UILabel *lblNotice = [UILabel new];
    lblNotice.font = [UIFont boldSystemFontOfSize:14];
    lblNotice.textColor = kColorWithHex(0x70be68);
    [self.contentView addSubview:lblNotice];
    if ([_orderModel.delstate isEqualToString:@"0"]) {
        //未处理
        lblNotice.text = @"未处理";
        [lblNotice mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self.contentView.mas_leading).offset(26);
            make.top.equalTo(self.lblOrderDate.mas_bottom).offset(13);
            make.size.mas_equalTo(CGSizeMake(60, 20));
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-44);
        }];
        UIButton *btnCall = [UIButton buttonWithType:UIButtonTypeCustom];
        [btnCall setImage:imgname(@"time_out_order_call_icon") forState:UIControlStateNormal];
        [btnCall addTarget:self action:@selector(btnCallClickAction:) forControlEvents:UIControlEventTouchUpInside];
        [self.contentView addSubview:btnCall];
        [btnCall mas_makeConstraints:^(MASConstraintMaker *make) {
            make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
            make.top.equalTo(self.lblOrderDate.mas_bottom).offset(15);
            make.size.mas_equalTo(CGSizeMake(127, 28));
        }];
    }else if ([_orderModel.delstate isEqualToString:@"1"]){
        //处理中
        lblNotice.text = @"处理中";
        [lblNotice mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self.contentView.mas_leading).offset(26);
            make.top.equalTo(self.lblOrderDate.mas_bottom).offset(13);
            make.size.mas_equalTo(CGSizeMake(60, 20));
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-44);
        }];
    }else if ([_orderModel.delstate isEqualToString:@"2"]){
        //已处理
        lblNotice.text = @"已处理";
        [lblNotice mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self.contentView.mas_leading).offset(26);
            make.top.equalTo(self.lblOrderDate.mas_bottom).offset(10);
            make.size.mas_equalTo(CGSizeMake(60, 20));
        }];
        
        UILabel *lblName = [UILabel new];
        lblName.text = [NSString stringWithFormat:@"师傅姓名：%@",_orderModel.repair_user_name];
        if (IS_SMALL_SCREEN) {
            lblName.font = [UIFont systemFontOfSize:12];
        }else{
            lblName.font = [UIFont systemFontOfSize:14];
        }
        lblName.textColor = kColorWithHex(0x70be68);
        [self.contentView addSubview:lblName];
        [lblName mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(lblNotice.mas_leading);
            make.top.equalTo(lblNotice.mas_bottom).offset(10);
            make.height.mas_equalTo(20);
        }];
        
        UILabel *lblPhone = [UILabel new];
        lblPhone.text = [NSString stringWithFormat:@"联系电话：%@",_orderModel.repair_user_phone];
        if (IS_SMALL_SCREEN) {
            lblPhone.font = [UIFont systemFontOfSize:12];
        }else{
            lblPhone.font = [UIFont systemFontOfSize:14];
        }
        lblPhone.textColor = kColorWithHex(0x70be68);
        [self.contentView addSubview:lblPhone];
        [lblPhone mas_makeConstraints:^(MASConstraintMaker *make) {
            make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
            make.top.equalTo(lblNotice.mas_bottom).offset(10);
            make.height.mas_equalTo(20);
        }];
        
        UILabel *lblContent = [UILabel new];
        lblContent.text = _orderModel.delcontent;
        if (IS_SMALL_SCREEN) {
            lblContent.font = [UIFont systemFontOfSize:12];
        }else{
            lblContent.font = [UIFont systemFontOfSize:14];
        }
        lblContent.textColor = kColorWithHex(0x70be68);
        lblContent.preferredMaxLayoutWidth = kScreen_Width - 52;
        lblContent.numberOfLines = 0;
        [self.contentView addSubview:lblContent];
        [lblContent mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(lblName.mas_leading);
            make.trailing.equalTo(lblPhone.mas_trailing);
            make.top.equalTo(lblName.mas_bottom).offset(5);
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-31);
        }];
        
    }
}
#pragma mark - 市县级经销商界面
- (void)setupBViewAction{
    
    UIImageView *ivBg = [UIImageView new];
    ivBg.image = imgname(@"round_gray_bg_icon");
    [self.contentView addSubview:ivBg];
    //[self.contentView sendSubviewToBack:ivBg];
    [ivBg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView.mas_top).offset(5);
        make.bottom.equalTo(self.contentView.mas_bottom).offset(-5);
        make.leading.equalTo(self.contentView.mas_leading).offset(3);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-3);
    }];
    
    UILabel *lblNoticeServe = [UILabel new];
    lblNoticeServe.text = @"服务类型";
    lblNoticeServe.font = [UIFont systemFontOfSize:14];
    lblNoticeServe.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:lblNoticeServe];
    [lblNoticeServe mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(self.contentView.mas_leading).offset(26);
        make.top.equalTo(self.contentView.mas_top).offset(52);
        make.size.mas_equalTo(CGSizeMake(60, 20));
    }];
    
    _lblServe = [UILabel new];
    _lblServe.font = [UIFont boldSystemFontOfSize:14];
    _lblServe.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:_lblServe];
    [_lblServe mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lblNoticeServe.mas_centerY);
        make.leading.equalTo(lblNoticeServe.mas_trailing).offset(10);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
        make.height.mas_equalTo(20);
    }];
    
    UIView *viewLineOne = [UIView new];
    viewLineOne.backgroundColor = kColorWithHex(0xdbdbdb);
    [self.contentView addSubview:viewLineOne];
    [viewLineOne mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeServe.mas_leading);
        make.top.equalTo(lblNoticeServe.mas_bottom).offset(6);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-6);
        make.height.mas_equalTo(1);
    }];
    
    UILabel *lblNoticeType = [UILabel new];
    lblNoticeType.text = @"电器品类";
    lblNoticeType.font = [UIFont systemFontOfSize:14];
    lblNoticeType.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:lblNoticeType];
    [lblNoticeType mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeServe.mas_leading);
        make.top.equalTo(viewLineOne.mas_bottom).offset(6);
        make.size.mas_equalTo(CGSizeMake(60, 20));
    }];
    
    _lblType = [UILabel new];
    _lblType.font = [UIFont boldSystemFontOfSize:14];
    _lblType.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:_lblType];
    [_lblType mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lblNoticeType.mas_centerY);
        make.leading.equalTo(lblNoticeType.mas_trailing).offset(10);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
        make.height.mas_equalTo(20);
    }];
    
    UIView *viewLineTwo = [UIView new];
    viewLineTwo.backgroundColor = kColorWithHex(0xdbdbdb);
    [self.contentView addSubview:viewLineTwo];
    [viewLineTwo mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeType.mas_leading);
        make.top.equalTo(lblNoticeType.mas_bottom).offset(6);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-6);
        make.height.mas_equalTo(1);
    }];
    
    UILabel *lblNoticeReason = [UILabel new];
    lblNoticeReason.text = @"故障原因";
    lblNoticeReason.font = [UIFont systemFontOfSize:14];
    lblNoticeReason.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:lblNoticeReason];
    [lblNoticeReason mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeServe.mas_leading);
        make.top.equalTo(viewLineTwo.mas_bottom).offset(6);
        make.size.mas_equalTo(CGSizeMake(60, 20));
    }];

    _lblReason = [UILabel new];
    _lblReason.font = [UIFont boldSystemFontOfSize:14];
    _lblReason.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:_lblReason];
    [_lblReason mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lblNoticeReason.mas_centerY);
        make.leading.equalTo(lblNoticeReason.mas_trailing).offset(10);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
        make.height.mas_equalTo(20);
    }];

    UIView *viewLineThree = [UIView new];
    viewLineThree.backgroundColor = kColorWithHex(0xdbdbdb);
    [self.contentView addSubview:viewLineThree];
    [viewLineThree mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeReason.mas_leading);
        make.top.equalTo(lblNoticeReason.mas_bottom).offset(6);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-6);
        make.height.mas_equalTo(1);
    }];


    UILabel *lblNoticeNumber = [UILabel new];
    lblNoticeNumber.text = @"数       量";
    lblNoticeNumber.font = [UIFont systemFontOfSize:14];
    lblNoticeNumber.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:lblNoticeNumber];
    [lblNoticeNumber mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeServe.mas_leading);
        make.top.equalTo(viewLineThree.mas_bottom).offset(6);
        make.size.mas_equalTo(CGSizeMake(60, 20));
    }];

    _lblNumber = [UILabel new];
    _lblNumber.font = [UIFont boldSystemFontOfSize:14];
    _lblNumber.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:_lblNumber];
    [_lblNumber mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lblNoticeNumber.mas_centerY);
        make.leading.equalTo(lblNoticeNumber.mas_trailing).offset(10);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
        make.height.mas_equalTo(20);
    }];

    UIView *viewLineFour = [UIView new];
    viewLineFour.backgroundColor = kColorWithHex(0xdbdbdb);
    [self.contentView addSubview:viewLineFour];
    [viewLineFour mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeNumber.mas_leading);
        make.top.equalTo(lblNoticeNumber.mas_bottom).offset(6);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-6);
        make.height.mas_equalTo(1);
    }];

    UILabel *lblNoticeContent = [UILabel new];
    lblNoticeContent.text = @"备注信息";
    lblNoticeContent.font = [UIFont systemFontOfSize:14];
    lblNoticeContent.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:lblNoticeContent];
    [lblNoticeContent mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeServe.mas_leading);
        make.top.equalTo(viewLineFour.mas_bottom).offset(6);
        make.size.mas_equalTo(CGSizeMake(60, 20));
    }];

    _lblContent = [UILabel new];
    _lblContent.text = @"备注信息";
    _lblContent.font = [UIFont systemFontOfSize:12];
    _lblContent.textColor = kColorWithHex(0x999999);
    _lblContent.numberOfLines = 0;
    _lblContent.preferredMaxLayoutWidth = kScreen_Width - 122;
    [self.contentView addSubview:_lblContent];
    [_lblContent mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(viewLineFour.mas_bottom).offset(10);
        make.leading.equalTo(lblNoticeContent.mas_trailing).offset(10);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
    }];

    UIView *viewLineFive = [UIView new];
    viewLineFive.backgroundColor = kColorWithHex(0xdbdbdb);
    [self.contentView addSubview:viewLineFive];
    [viewLineFive mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeContent.mas_leading);
        make.top.equalTo(self.lblContent.mas_bottom).offset(14);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-6);
        make.height.mas_equalTo(1);
    }];

    UILabel *lblNoticeDate = [UILabel new];
    lblNoticeDate.text = @"预约日期";
    lblNoticeDate.font = [UIFont systemFontOfSize:14];
    lblNoticeDate.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:lblNoticeDate];
    [lblNoticeDate mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeServe.mas_leading);
        make.top.equalTo(viewLineFive.mas_bottom).offset(6);
        make.size.mas_equalTo(CGSizeMake(60, 20));
    }];

    _lblDate = [UILabel new];
    _lblDate.font = [UIFont boldSystemFontOfSize:14];
    _lblDate.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:_lblDate];
    [_lblDate mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lblNoticeDate.mas_centerY);
        make.leading.equalTo(lblNoticeDate.mas_trailing).offset(10);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
        make.height.mas_equalTo(20);
    }];

    UIView *viewLineSix = [UIView new];
    viewLineSix.backgroundColor = kColorWithHex(0xdbdbdb);
    [self.contentView addSubview:viewLineSix];
    [viewLineSix mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeDate.mas_leading);
        make.top.equalTo(lblNoticeDate.mas_bottom).offset(6);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-6);
        make.height.mas_equalTo(1);
    }];

    UILabel *lblNoticeTime = [UILabel new];
    lblNoticeTime.text = @"预约时间";
    lblNoticeTime.font = [UIFont systemFontOfSize:14];
    lblNoticeTime.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:lblNoticeTime];
    [lblNoticeTime mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeServe.mas_leading);
        make.top.equalTo(viewLineSix.mas_bottom).offset(6);
        make.size.mas_equalTo(CGSizeMake(60, 20));
    }];

    _lblTime = [UILabel new];
    _lblTime.font = [UIFont boldSystemFontOfSize:14];
    _lblTime.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:_lblTime];
    [_lblTime mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lblNoticeTime.mas_centerY);
        make.leading.equalTo(lblNoticeTime.mas_trailing).offset(10);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
        make.height.mas_equalTo(20);
    }];

    UIView *viewLineSeven = [UIView new];
    viewLineSeven.backgroundColor = kColorWithHex(0xdbdbdb);
    [self.contentView addSubview:viewLineSeven];
    [viewLineSeven mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeTime.mas_leading);
        make.top.equalTo(lblNoticeTime.mas_bottom).offset(6);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-6);
        make.height.mas_equalTo(1);
    }];

    UILabel *lblNoticeAddress = [UILabel new];
    lblNoticeAddress.text = @"地址";
    lblNoticeAddress.font = [UIFont systemFontOfSize:14];
    lblNoticeAddress.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:lblNoticeAddress];
    [lblNoticeAddress mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeServe.mas_leading);
        make.top.equalTo(viewLineSeven.mas_bottom).offset(6);
        make.size.mas_equalTo(CGSizeMake(30, 20));
    }];

    _lblAddress = [UILabel new];
    _lblAddress.text = @"地址";
    _lblAddress.font = [UIFont systemFontOfSize:12];
    _lblAddress.textColor = kColorWithHex(0x666666);
    _lblAddress.numberOfLines = 2;
    _lblAddress.preferredMaxLayoutWidth = kScreen_Width - 92;
    [self.contentView addSubview:_lblAddress];
    [_lblAddress mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(viewLineSeven.mas_bottom).offset(9);
        make.leading.equalTo(lblNoticeAddress.mas_trailing).offset(10);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
    }];

    UIView *viewLineEight = [UIView new];
    viewLineEight.backgroundColor = kColorWithHex(0xdbdbdb);
    [self.contentView addSubview:viewLineEight];
    [viewLineEight mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeAddress.mas_leading);
        make.top.equalTo(self.lblAddress.mas_bottom).offset(9);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-6);
        make.height.mas_equalTo(1);
    }];

    UILabel *lblNoticeLift = [UILabel new];
    lblNoticeLift.text = @"电梯";
    lblNoticeLift.font = [UIFont systemFontOfSize:14];
    lblNoticeLift.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:lblNoticeLift];
    [lblNoticeLift mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeServe.mas_leading);
        make.top.equalTo(viewLineEight.mas_bottom).offset(6);
        make.size.mas_equalTo(CGSizeMake(30, 20));
    }];

    _lblLift = [UILabel new];
    _lblLift.font = [UIFont boldSystemFontOfSize:14];
    _lblLift.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:_lblLift];
    [_lblLift mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lblNoticeLift.mas_centerY);
        make.leading.equalTo(lblNoticeLift.mas_trailing).offset(10);
        make.height.mas_equalTo(20);
    }];

    _lblFloor = [UILabel new];
    _lblFloor.font = [UIFont boldSystemFontOfSize:14];
    _lblFloor.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:_lblFloor];
    [_lblFloor mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lblNoticeLift.mas_centerY);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
        make.height.mas_equalTo(20);
    }];

    UILabel *lblNoticeFloor = [UILabel new];
    lblNoticeFloor.text = @"楼层";
    lblNoticeFloor.font = [UIFont systemFontOfSize:14];
    lblNoticeFloor.textColor = kColorWithHex(0x666666);
    [self.contentView addSubview:lblNoticeFloor];
    [lblNoticeFloor mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lblNoticeLift.mas_centerY);
        make.trailing.equalTo(self.lblFloor.mas_leading).offset(-10);
        make.size.mas_equalTo(CGSizeMake(30, 20));
    }];

    UIView *viewLineNine = [UIView new];
    viewLineNine.backgroundColor = kColorWithHex(0xdbdbdb);
    [self.contentView addSubview:viewLineNine];
    [viewLineNine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeLift.mas_leading);
        make.top.equalTo(lblNoticeLift.mas_bottom).offset(6);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-6);
        make.height.mas_equalTo(1);
    }];

    UILabel *lblNoticeOrderDate = [UILabel new];
    lblNoticeOrderDate.text = @"下单时间";
    lblNoticeOrderDate.font = [UIFont boldSystemFontOfSize:14];
    lblNoticeOrderDate.textColor = kColorWithHex(0xf88b1f);
    [self.contentView addSubview:lblNoticeOrderDate];
    [lblNoticeOrderDate mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(lblNoticeServe.mas_leading);
        make.top.equalTo(viewLineNine.mas_bottom).offset(6);
        make.size.mas_equalTo(CGSizeMake(60, 20));
        //市县级到此不再布局
        if (AGENT_LEVEL != 1) {
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-31);
        }
    }];

    _lblOrderDate = [UILabel new];
    _lblOrderDate.text = @"下单时间";
    _lblOrderDate.font = [UIFont systemFontOfSize:16];
    _lblOrderDate.textColor = kColorWithHex(0xf88b1f);
    [self.contentView addSubview:_lblOrderDate];
    [_lblOrderDate mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lblNoticeOrderDate.mas_centerY);
        make.leading.equalTo(lblNoticeOrderDate.mas_trailing).offset(10);
        make.trailing.equalTo(self.contentView.mas_trailing).offset(-26);
        make.height.mas_equalTo(20);
    }];
    
    
}
#pragma mark - 数据更新
- (void)setOrderModel:(ZTimeOutOrderModel *)orderModel{
    if (orderModel) {
        _orderModel = orderModel;
        _lblServe.text = orderModel.service_name;
        _lblType.text = [NSString stringWithFormat:@"%@ %@",orderModel.firstName,orderModel.secondName];
        _lblReason.text = orderModel.common_failures;
        _lblNumber.text = orderModel.repair_number;
        _lblContent.text = orderModel.fault_comment.length > 0 ? orderModel.fault_comment : @"暂无信息";
        _lblDate.text = orderModel.order_date;
        _lblTime.text = orderModel.order_time;
        _lblAddress.text = orderModel.user_address;
        if ([orderModel.has_elevator isEqualToString:@"1"]) {
            _lblLift.text = @"有";
        }else{
            _lblLift.text = @"无";
        }
        _lblFloor.text = [NSString stringWithFormat:@"%@楼",orderModel.floorNum];
        _lblOrderDate.text = orderModel.create_time;
        
        if (AGENT_LEVEL == 1) {
            [self setupAViewAction];
        }
    }
}
#pragma mark - 交互事件
- (void)btnCallClickAction:(UIButton *)sender{
    if (_orderModel.agentBPhone.length > 0) {
        [HFTools callMobilePhone:_orderModel.agentBPhone];
    }else{
        ShowToastWithText(@"该区域暂无相关管理人员");
    }
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
